<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>锚点</title>
    <link rel="stylesheet" href="../CSS/锚点css.css">
    <script src="../JS/锚点.js"></script>
</head>
<body>
<!--导航栏-->

    <div class="top">
        <div id="three">three</div>
        <div id="two">two</div>
        <div id="one">one</div>
    </div>
    <!--三个div-->
    <div id="outermost1"></div>
    <div id="outermost2"></div>
    <div id="outermost3"></div>

    <script> /* 使div的噶度等于屏幕的高度*/
    var out1 = document.getElementById("outermost1");
    var out2 = document.getElementById("outermost2");
    var out3 = document.getElementById("outermost3");
    out1.style.height = window.screen.height  + "px";
    out2.style.height = window.screen.height  + "px";
    out3.style.height = window.screen.height  + "px";
    </script>

    <script language="JavaScript">
        var bar1 = document.getElementById("one");
        var bar2 = document.getElementById("two");
        var bar3 = document.getElementById("three");
        var go1 , go2 , go3;
        bar1.addEventListener("click",onefun);
        bar2.addEventListener("click",twofun);
        bar3.addEventListener("click",threefun);
    </script>

</body>
</html>